/**
 * @Author Fish Paradise
 * @Description 饿汉式单例模式
 * @Date 2019/1/18  16:29
 **/
public class EagerSingleton {
    private static EagerSingleton eagerSingleton = new EagerSingleton();

    private EagerSingleton() {
    }

    public static EagerSingleton getInsteance(){
        return eagerSingleton;
    }

    public void speak(){
        System.out.println("这是饿汉式单例模式");
    }

}
